home *** CD-ROM | disk | FTP | other *** search
- #ifndef _DISPLAY_
- #define _DISPLAY_
-
- #include <Displays.h>
- #include <MacMemory.h>
- #include <MacTypes.h>
- #include <QuickDraw.h>
- #include "ProcInfo.h"
-
-
- typedef class SysWinHandler
- {
- public:
- virtual Boolean EventHandler(WindowPtr window,EventRecord *event,SInt16 part) = 0;
- } SysWinHandler;
-
- typedef class Display : public SysWinHandler
- {
- public:
- Display *next;
-
- void *operator new(size_t len) { return (void*)NewPtrSysClear(len); }
- void operator delete(void *data) { DisposePtr((Ptr)data); }
-
- Display(UInt32 index);
- ~Display(void);
-
- OSStatus Create(GDHandle gdevToClone,DisplayIDType displayID,Boolean clone);
- void Destroy(void);
- void MoveTo(SInt16 x,SInt16 y);
-
- Boolean Contains(Point where);
- Point GetOffset(void) { return *(Point*)&fGDev[0]->gdRect; }
- DisplayIDType GetDisplayID(void) { return fDisplayID; }
- void ShowHide(Boolean show);
-
- private:
- UInt32 fIndex;
- GDHandle fGDev;
- DisplayIDType fDisplayID;
- Boolean fCloneDisplay;
- WindowPtr fCoverWindow;
- WindowPtr fMBarWindow;
-
- Boolean EventHandler(WindowPtr window,EventRecord *event,SInt16 part);
- } Display;
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- WindowPtr NewSysWindow(Rect *bounds,StringPtr title,Boolean visible,SInt16 procID,WindowPtr behind,
- Boolean goAwayFlag,SysWinHandler *handler,RgnHandle rgn);
- OSErr DisposeSysWindow(WindowPtr window);
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* _DISPLAY_ */
-